#ifndef _BSP_GPIO_H_
#define _BSP_GPIO_H_

#include <stm32f4xx_hal.h>

#define BSP_LED0_GROUP GPIOC
#define BSP_LED0_PIN GPIO_PIN_13
#define BSP_LED0_GROUP_RCC_ENABLE __HAL_RCC_GPIOC_CLK_ENABLE()

#define BSP_LED1_GROUP GPIOC
#define BSP_LED1_PIN GPIO_PIN_14
#define BSP_LED1_GROUP_RCC_ENABLE __HAL_RCC_GPIOC_CLK_ENABLE()

#define BSP_LED2_GROUP GPIOC
#define BSP_LED2_PIN GPIO_PIN_15
#define BSP_LED2_GROUP_RCC_ENABLE __HAL_RCC_GPIOC_CLK_ENABLE()

enum bsp_led_idx
{
    led0,
    led1,
    led2
};

enum bsp_led_state
{
    on,
    off,
    toogle
};

/* 初始化LED */
int bsp_led_init(void);

/* 对LED进行操作 */
int bsp_led_operation(enum bsp_led_idx led, enum bsp_led_state state);

#endif